<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2023/3/31
  Time: 19:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<head>
    <title>题库</title>
</head>
<body>
<h1 style="text-align: center">题库</h1>
<p style="color: gray;font-size: 12px;text-indent: 5px">温馨提示:鼠标停留获取题目详情</p>
<hr>
<input type="button" value="返回" onclick="back()">
<input type="button" value="新建" style="margin-left: 20px" onclick="addquestion()">
    <c:forEach items="${questions}" var="question" varStatus="id">
        <br><br>
        <a title=" ${question.getQuestion()}">题目id: ${question.getId()}</a><br>
        <a href="http://localhost:8080/ExaminationManagement1_war/DeleteQuestion?id=${question.getId()}">
            删除
        </a>
        <a href="http://localhost:8080/ExaminationManagement1_war/SelectQuestion?index=${id.index}">
            编辑
        </a>
        <br><br>
    </c:forEach>
<script type="text/javascript">
    function addquestion(){
        window.location="addquestion.jsp"
    }
    function back(){
        window.location="teacher.jsp"
    }
</script>
</body>
</html>
